#python类的练习
class dog:
    def __init__(self, name):
        self.name = name
dog1=dog('旺财')
print(dog1.name)
#学生类
class student:
    def __init__(self, name,id,a,b,c):
        self.name = name
        self.id = id
        self.a = a
        self.b = b
        self.c = c
    def print_self(self):
        print(self.name," ", self.id," ", self.a," ", self.b," ", self.c)
xiaoming=student("xiaoming","001",10,20,30)
print(xiaoming.print_self())
#员工
class staff:
    def __init__(self,name,id):
        self.name = name
        self.id = id
    def print_self(self):
        print(f"{self.name} {self.id}")
class astaff(staff):
    def __init__(self,name,id,moth_money):
        super().__init__(name,id)
        self.moth_money = moth_money
    def print_money(self):
        print(f"{self.name} {self.id} {self.moth_money}")
class bstaff(staff):
    def __init__(self,name,id,day,day_money):
        super().__init__(name,id)
        self.day = day
        self.day_money = day_money
    def print_money(self):
        money=self.day*self.day_money
        print(f"{self.name} {self.id} {money}")

xiaoliu=astaff("xiaoliu","001","8000")
xiaoli=bstaff("xiaoli","001",100,30)
xiaoliu.print_money()
xiaoli.print_money()